<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>新增文章</title>
  <link rel="stylesheet" href="../static/lib/layui/css/layui.css">
  <link rel="stylesheet" href="../static/css/base/base.css">
  <link rel="stylesheet" href="../static/css/components/add-article.css">
  <link rel="stylesheet" href="../static/ueditor/themes/default/css/umeditor.css">

</head>

<body>
  <ul class="layui-nav" lay-filter="">
    <li class="layui-nav-item">
      <a href="">logo</a>
    </li>
    <li class="layui-nav-item layui-this ">
      <a href="../index.html">文章管理</a>
    </li>
    <li class="layui-nav-item">
      <a href="../activity/active.html">活动管理</a>
    </li>
    <li class="layui-nav-item">
      <a href="../tea/tea.html">茶馆管理</a>
    </li>
    <li class="layui-nav-item">
      <a href="../collection/collection.html">藏家行情</a>
    </li>
    <li class="layui-nav-item">
      <a href="../proprietary/proprietary.html">自营商品</a>
    </li>
    <li class="layui-nav-item">
      <a href="../banner/banner.html">banner管理</a>
    </li>
    <li class="layui-nav-item">
      <a href="../sms/sms.html">短信模板</a>
    </li>
    <!-- 头部右侧 -->
    <div class="header-right">
      <div class="help">
        <i class="layui-icon layui-icon-help ic-help" style="font-size: 6px; "></i>
      </div>
      <li class="layui-nav-item">
        <a href="">帮助</a>
      </li>
      <li class="layui-nav-item">
        <a href="">
          <img src="http://t.cn/RCzsdCq" class="layui-nav-img">我</a>
      </li>
    </div>
  </ul>

  <!-- 面包屑 -->
  <div class="breadcrumb">
    <span class="layui-breadcrumb"lay-separator=">">
      <a href="">全部文章</a>
      <a href="">新增文章</a>
    </span>
  </div>


  <!-- 中间内容区 -->
  <div class="container">
    <div class="con-left fl">
      <ul class="layui-nav layui-nav-tree" lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a href="javascript:;">文章管理</a>
          <dl class="layui-nav-child">
            <dd>
              <a href="../index.html">全部文章</a>
            </dd>
          </dl>
        </li>
      </ul>
    </div>
    <!-- 中间区域右侧 -->
    <div class="con-right fr">
      <!-- 文章标题 -->
      <form class="layui-form add-form" action="">
        <div class="layui-form-item">
          <div class="layui-input-block">
            <span class="title">文章标题</span>
            <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off" class="layui-input">
          </div>
        </div>

        <div class="layui-form-item">
          <div class="layui-input-block">
            <span class="title">文章正文</span>
            <!-- 编辑器 -->
            <textarea id="text"></textarea>
          </div>
        </div>

        <div class="layui-form-item">
          <div class="layui-input-block fa-title">
            <span class="title">标签设置</span>
            <a href="javascript:;" class="title" id="add-title">新增标签</a>
            <ul class="tag-set">
              <li>
                <input type="checkbox" name="" title="新手" lay-skin="primary">
              </li>
              <li>
                <input type="checkbox" name="" title="健康" lay-skin="primary">
              </li>
              <li>
                <input type="checkbox" name="" title="财富" lay-skin="primary">
              </li>
              <li>
                <input type="checkbox" name="" title="老茶客" lay-skin="primary">
              </li>
            </ul>
          </div>
        </div>

        <div class="layui-form-item">
          <div class="layui-input-block">
            <span class="title">推荐设置</span>
            <ul class="tag-set">
              <li>
                <input type="checkbox" name="" title="加入首页" lay-skin="primary">
              </li>
              <li>
                <input type="checkbox" name="" title="新手置顶" lay-skin="primary">
              </li>
              <li>
                <input type="checkbox" name="" title="茶文置顶" lay-skin="primary">
              </li>
            </ul>
          </div>
        </div>

        <div class="layui-form-item">

          <div class="layui-input-block">
            <label class="layui-form-label open">上架</label>
            <input type="checkbox" name="switch" lay-skin="switch">
          </div>
        </div>

        <div class="layui-form-item">
          <div class="layui-input-block">
            <button class="layui-btn preview" lay-submit lay-filter="formDemo">预览</button>
            <button class="layui-btn preview" lay-submit lay-filter="formDemo">立即提交</button>
          </div>
        </div>
      </form>
    </div>



    <script src="../static/lib/layui/layui.all.js"></script>
    <script src="../static/ueditor/jquery.js"></script>
    <script src="../static/ueditor/umeditor.config.js"></script>
    <script src="../static/ueditor/umeditor.js"></script>
    <script src="../static/ueditor/lang/zh-cn/zh-cn.js"></script>
    <script src="../static/js/base.js"></script>

    <script>
      ; !function () {
        //无需再执行layui.use()方法加载模块，直接使用即可
        var form = layui.form
          , layer = layui.layer;
        form.on('submit(formDemo)', function (data) {
          layer.msg(JSON.stringify(data.field));
          return false;
        });
        var addtit=my('add-title');
        addtit.onclick=function(){
          layer.prompt(function (val, index) {
            layer.msg('新增了' + val);
            layer.close(index);
          });
        }

      }();
    </script>

    <script>
      var um = UM.getEditor('text', {
        initialFrameWidth: 800,
        initialFrameHeight: 250,
        initialContent: '内容'
      });
    </script>




</body>

</html>